﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ThoiTrang.Business;
using ThoiTrang.Entities;

public partial class user_favcat : System.Web.UI.Page
{
    //store a_user_favcat_sel
    //table a_Favorites
    public a_FavoriteCollection favs;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!SessionManager.IsLogged)
            Response.Redirect("login.aspx?ckid=" + SessionManager.GetCookie(), true);        
        if (Request["a"] != null && Request["a"] == "del")
        {
            a_FavoriteService.Deletea_Favorite(int.Parse(Request["fid"]));
            msg.InnerHtml = "Đã xóa mục yêu thích";
            msg.Visible = true;
        }
        favs = a_FavoriteService.Geta_FavoriteListListCatBySSID(SessionManager.GetCookie(), a_FavoriteColumns.ID, ThoiTrang.Data.OrderDirection.ASC);
    }
}
